package com.pycredit.bean;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

import com.pycredit.type.PersonType;

/**
 * @category 各服务人工时间成本,当为A类时，totleTime = actualizeTime+technologicalDevTime+contractActTime
 * 
 * @author yiz
 * @date 2016年5月25日 上午8:49:44
 * @version 1.0.0 
 * @copyright pycredit.cn 
 */
public class ServiceTypePersonTimeParam implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8939577657212924436L;

	/**
	 * @category 人员类别
	 */
	private PersonType personType;

	/**
	 * @category 业务
	 */
	private int actualizeTime;

	/**
	 * @category 技术开发
	 */
	private int technologicalDevTime;

	/**
	 * @category 合同实施
	 */
	private int contractActTime;

	/**
	 * @category 总时间
	 */
	private int totleTime;

	public PersonType getPersonType() {
		return personType;
	}

	public void setPersonType(PersonType personType) {
		this.personType = personType;
	}

	public int getActualizeTime() {
		return actualizeTime;
	}

	public void setActualizeTime(int actualizeTime) {
		this.actualizeTime = actualizeTime;
	}

	public int getTechnologicalDevTime() {
		return technologicalDevTime;
	}

	public void setTechnologicalDevTime(int technologicalDevTime) {
		this.technologicalDevTime = technologicalDevTime;
	}

	public int getContractActTime() {
		return contractActTime;
	}

	public void setContractActTime(int contractActTime) {
		this.contractActTime = contractActTime;
	}

	public int getTotleTime() {
		//当为A类人员时
		if (StringUtils.isNotBlank(getPersonType().name())
				&& PersonType.A.getType().equals(getPersonType().getType())) {
			return actualizeTime + contractActTime + technologicalDevTime;
		}
		//BC直接取总数
		return totleTime;
	}

	public void setTotleTime(int totleTime) {
		this.totleTime = totleTime;
	}

}
